﻿@model IDictionary<string, string>
@{
    ViewBag.Title = "ITSM";
}
@section ScriptAndCss{
    <script src="@Url.Content("~/Scripts/highcharts.js")" type="text/javascript"></script>
    <script type="text/javascript">

        window.onload = function () {
            $('#btn_refresh').click();
        }
        function formateDesc(value, row, index) {
            var abValue = value;
            if (value.length >= 22) {
                abValue = value.substring(0, 20) + "...";
            }
            var content = '<a href="#" title="' + value + '" class="note">' + abValue + '</a>';
            return content;
        }
        $(function () {
            $('#counta').find('a').click(function () {
                $(this).attr("href", "#show");
                $(this).addClass('active');
            })

            $('#dg').datagrid({
                onLoadSuccess: function (data) {
                    $(".note").tooltip({
                        onShow: function () {
                            $(this).tooltip('tip').css({
                                width: '300',
                                boxShadow: '1px 1px 3px #292929'
                            });
                        }
                    });
                },
                onDblClickRow: function (rowIndex, rowData) {
                    var rnd = (new Date()).getMilliseconds() + "" + parseInt(Math.random() * 10000);
                    $.ajax({
                        url: 'GetURL',
                        data: { type: rowData.TypeS, ids: rowData.IDS, nocatch: rnd },
                        success: function (result) {
                            window.open("/Account/SSO?redirectionUrl=" + encodeURI(result) + "catchid=" + rnd);
                        }

                    });
                }
            });
            var p = $('#dg').datagrid('getPager');

            $(p).pagination({
                pageNumber: 1,
                beforePageText: '第',

                afterPageText: '页    共 {pages} 页',

                displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录'

            });
            $('#startdt').datebox({
                currentText: '今天',
                closeText: '关闭'
            });
            $('#enddt').datebox({
                currentText: '今天',
                closeText: '关闭'
            });
            $('#btn_refresh').linkbutton({
                plain: false
            });

            $('#serviceunresolvecount').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed;
                $('#dg').datagrid('load');
            });
            $('#incidentunsolvecount').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed;
                $('#dg').datagrid('load');
            });
            $('#changeunsolvecount').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed;
                $('#dg').datagrid('load');
            });


            $('#ssunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=101";
                $('#dg').datagrid('load');
            });
            $('#siunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=101";
                $('#dg').datagrid('load');
            });
            $('#scunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=101";
                $('#dg').datagrid('load');
            });

            $('#hssunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=116";
                $('#dg').datagrid('load');
            });
            $('#hsiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=116";
                $('#dg').datagrid('load');
            });
            $('#hscunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=116";
                $('#dg').datagrid('load');
            });

            $('#fzsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=110";
                $('#dg').datagrid('load');
            });
            $('#fziunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=110";
                $('#dg').datagrid('load');
            });
            $('#fzcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=110";
                $('#dg').datagrid('load');
            });

            $('#xmsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=106";
                $('#dg').datagrid('load');
            });
            $('#xmiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=106";
                $('#dg').datagrid('load');
            });
            $('#xmcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=106";
                $('#dg').datagrid('load');
            });

            $('#ndsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=107";
                $('#dg').datagrid('load');
            });
            $('#ndiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=107";
                $('#dg').datagrid('load');
            });
            $('#ndcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=107";
                $('#dg').datagrid('load');
            });
            $('#ptsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=105";
                $('#dg').datagrid('load');
            });
            $('#ptiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=105";
                $('#dg').datagrid('load');
            });
            $('#ptcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=105";
                $('#dg').datagrid('load');
            });

            $('#qzsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=108";
                $('#dg').datagrid('load');
            });
            $('#qziunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=108";
                $('#dg').datagrid('load');
            });
            $('#qzcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=108";
                $('#dg').datagrid('load');
            });

            $('#zzsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=109";
                $('#dg').datagrid('load');
            });
            $('#zziunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=109";
                $('#dg').datagrid('load');
            });
            $('#zzcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=109";
                $('#dg').datagrid('load');
            });

            $('#lysunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=103";
                $('#dg').datagrid('load');
            });
            $('#lyiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=103";
                $('#dg').datagrid('load');
            });
            $('#lycunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=103";
                $('#dg').datagrid('load');
            });

            $('#smsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=102";
                $('#dg').datagrid('load');
            });
            $('#smiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=102";
                $('#dg').datagrid('load');
            });
            $('#smcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=102";
                $('#dg').datagrid('load');
            });

            $('#npsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=104";
                $('#dg').datagrid('load');
            });
            $('#npiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=104";
                $('#dg').datagrid('load');
            });
            $('#npcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=104";
                $('#dg').datagrid('load');
            });
            $('#jcksunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=112";
                $('#dg').datagrid('load');
            });
            $('#jckiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=112";
                $('#dg').datagrid('load');
            });
            $('#jckcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=112";
                $('#dg').datagrid('load');
            });
            $('#htsunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=114";
                $('#dg').datagrid('load');
            });
            $('#htiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=114";
                $('#dg').datagrid('load');
            });
            $('#htcunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=114";
                $('#dg').datagrid('load');
            });
            $('#yysunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=113";
                $('#dg').datagrid('load');
            });
            $('#yyiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=113";
                $('#dg').datagrid('load');
            });
            $('#yycunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=113";
                $('#dg').datagrid('load');
            });
            $('#smjysunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=service&startdate=" + bd + "&enddate=" + ed + "&local=111";
                $('#dg').datagrid('load');
            });
            $('#smjyiunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=incident&startdate=" + bd + "&enddate=" + ed + "&local=111";
                $('#dg').datagrid('load');
            });
            $('#smjycunsolve').click(function () {
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $('#dg').datagrid('options').url = "GetTableData?type=change&startdate=" + bd + "&enddate=" + ed + "&local=111";
                $('#dg').datagrid('load');
            });


            $('#btn_refresh').click(function () {
                var option = {
                    chart: {
                        renderTo: '',
                        type: 'column',
                        margin: [40, 2, 20, 2]
                    },
                    title: {
                        text: '',
                        style: {
                            color: 'gray',
                            fontSize: '14px'
                        }
                    },
                    xAxis: {
                        categories: [],
                        labels: {
                            align: 'center',
                            style: {
                                fontSize: '13px',
                                fontFamily: 'Verdana, sans-serif'
                            }
                        }
                    },

                    yAxis: {
                        tickInterval: 120,    //自定义刻度  
                        max: 120,//Y轴最大值  
                        title: {
                            text: '解决率',
                            //              tickPixelInterval:10,  
                            margin: 50
                        },
                        gridLineWidth: 0
                        //plotLines: [{
                        //    value: 0,
                        //    width: 1,
                        //}]
                    },
                    //yAxis: {
                    //    title: {
                    //        text: '解决率'
                    //    },
                    //    min: 0,
                    //    gridLineWidth: 0
                    //},
                    legend: { enabled: false },
                    tooltip: {
                        formatter: function () {
                            return '<b>' + this.x + '</b><br/>' +
                        this.series.name + ': ' + this.y + '%<br/>';
                        }
                    },
                    plotOptions: {
                        size: 100,
                        column: {
                            dataLabels: {
                                enabled: true,

                                fontWeight: 'bold',
                                color: 'black',
                                formatter: function () {
                                    return this.y + '%';
                                }
                            }
                        }

                    },
                    series: [{
                        name: '解决率',
                        color: '#c0504e',
                        data: []
                    }]
                };
                var bd = $('#startdt').datetimebox('getValue');
                var ed = $('#enddt').datetimebox('getValue');
                $.post('@Url.Action("GetCount", "ITSM")', { startdate: bd, enddate: ed },
             function (result) {
                 $('#servicecount').html(result.servicecount);
                 $('#serviceunresolvecount').html(result.serviceunresolvecount);
                 $('#incidentcount').html(result.incidentcount);
                 $('#incidentunsolvecount').html(result.incidentunsolvecount);
                 $('#changecount').html(result.changecount);
                 $('#changeunsolvecount').html(result.changunsolvecount);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 101 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'shengju';
                 option.title.text = '省局机关';
                 $('#ssall').html(result.seriesdata[0]);
                 $('#ssunsolve').html(result.seriesdata2[0]);
                 $('#siall').html(result.seriesdata[1]);
                 $('#siunsolve').html(result.seriesdata2[1]);
                 $('#scall').html(result.seriesdata[2]);
                 $('#scunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 116 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'haisheng';
                 option.title.text = '中软海晟福州办';
                 $('#hssall').html(result.seriesdata[0]);
                 $('#hssunsolve').html(result.seriesdata2[0]);
                 $('#hsiall').html(result.seriesdata[1]);
                 $('#hsiunsolve').html(result.seriesdata2[1]);
                 $('#hscall').html(result.seriesdata[2]);
                 $('#hscunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 110 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'fuzhou';
                 option.title.text = '福州烟草';
                 $('#fzsall').html(result.seriesdata[0]);
                 $('#fzsunsolve').html(result.seriesdata2[0]);
                 $('#fziall').html(result.seriesdata[1]);
                 $('#fziunsolve').html(result.seriesdata2[1]);
                 $('#fzcall').html(result.seriesdata[2]);
                 $('#fzcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 106 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'xiamen';
                 option.title.text = '厦门烟草';
                 $('#xmsall').html(result.seriesdata[0]);
                 $('#xmsunsolve').html(result.seriesdata2[0]);
                 $('#xmiall').html(result.seriesdata[1]);
                 $('#xmiunsolve').html(result.seriesdata2[1]);
                 $('#xmcall').html(result.seriesdata[2]);
                 $('#xmcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 107 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'ningde';
                 option.title.text = '宁德烟草';
                 $('#ndsall').html(result.seriesdata[0]);
                 $('#ndsunsolve').html(result.seriesdata2[0]);
                 $('#ndiall').html(result.seriesdata[1]);
                 $('#ndiunsolve').html(result.seriesdata2[1]);
                 $('#ndcall').html(result.seriesdata[2]);
                 $('#ndcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 105 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'putian';
                 option.title.text = '莆田烟草';
                 $('#ptsall').html(result.seriesdata[0]);
                 $('#ptsunsolve').html(result.seriesdata2[0]);
                 $('#ptiall').html(result.seriesdata[1]);
                 $('#ptiunsolve').html(result.seriesdata2[1]);
                 $('#ptcall').html(result.seriesdata[2]);
                 $('#ptcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 108 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'quanzhou';
                 option.title.text = '泉州烟草';
                 $('#qzsall').html(result.seriesdata[0]);
                 $('#qzsunsolve').html(result.seriesdata2[0]);
                 $('#qziall').html(result.seriesdata[1]);
                 $('#qziunsolve').html(result.seriesdata2[1]);
                 $('#qzcall').html(result.seriesdata[2]);
                 $('#qzcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 109 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'zhangzhou';
                 option.title.text = '漳州烟草';
                 $('#zzsall').html(result.seriesdata[0]);
                 $('#zzsunsolve').html(result.seriesdata2[0]);
                 $('#zziall').html(result.seriesdata[1]);
                 $('#zziunsolve').html(result.seriesdata2[1]);
                 $('#zzcall').html(result.seriesdata[2]);
                 $('#zzcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 103 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'longyan';
                 option.title.text = '龙岩烟草';
                 $('#lysall').html(result.seriesdata[0]);
                 $('#lysunsolve').html(result.seriesdata2[0]);
                 $('#lyiall').html(result.seriesdata[1]);
                 $('#lyiunsolve').html(result.seriesdata2[1]);
                 $('#lycall').html(result.seriesdata[2]);
                 $('#lycunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 102 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'sanming';
                 option.title.text = '三明烟草';
                 $('#smsall').html(result.seriesdata[0]);
                 $('#smsunsolve').html(result.seriesdata2[0]);
                 $('#smiall').html(result.seriesdata[1]);
                 $('#smiunsolve').html(result.seriesdata2[1]);
                 $('#smcall').html(result.seriesdata[2]);
                 $('#smcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 104 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'nanping';
                 option.title.text = '南平烟草';
                 $('#npsall').html(result.seriesdata[0]);
                 $('#npsunsolve').html(result.seriesdata2[0]);
                 $('#npiall').html(result.seriesdata[1]);
                 $('#npiunsolve').html(result.seriesdata2[1]);
                 $('#npcall').html(result.seriesdata[2]);
                 $('#npcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 112 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'hsjck';
                 option.title.text = '进出口';
                 $('#jcksall').html(result.seriesdata[0]);
                 $('#jcksunsolve').html(result.seriesdata2[0]);
                 $('#jckiall').html(result.seriesdata[1]);
                 $('#jckiunsolve').html(result.seriesdata2[1]);
                 $('#jckcall').html(result.seriesdata[2]);
                 $('#jckcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 114 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'haitou';
                 option.title.text = '海投集团';
                 $('#htsall').html(result.seriesdata[0]);
                 $('#htsunsolve').html(result.seriesdata2[0]);
                 $('#htiall').html(result.seriesdata[1]);
                 $('#htiunsolve').html(result.seriesdata2[1]);
                 $('#htcall').html(result.seriesdata[2]);
                 $('#htcunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 113 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'yanye';
                 option.title.text = '武夷烟叶';
                 $('#yysall').html(result.seriesdata[0]);
                 $('#yysunsolve').html(result.seriesdata2[0]);
                 $('#yyiall').html(result.seriesdata[1]);
                 $('#yyiunsolve').html(result.seriesdata2[1]);
                 $('#yycall').html(result.seriesdata[2]);
                 $('#yycunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $.post('@Url.Action("GetReport", "ITSM")', { startdate: bd, enddate: ed, location: 111 },
             function (result) {
                 option.xAxis.categories = result.categories;
                 option.series[0].data = result.seriesdata3;
                 option.chart.renderTo = 'smjinye';
                 option.title.text = '三明金叶';
                 $('#smjysall').html(result.seriesdata[0]);
                 $('#smjysunsolve').html(result.seriesdata2[0]);
                 $('#smjyiall').html(result.seriesdata[1]);
                 $('#smjyiunsolve').html(result.seriesdata2[1]);
                 $('#smjycall').html(result.seriesdata[2]);
                 $('#smjycunsolve').html(result.seriesdata2[2]);
                 var chart = new Highcharts.Chart(option);
             });
                $('#dg').datagrid('options').url = "GetTableData";
                $('#dg').datagrid('reload');
            });
        });
    </script>
    <style type="text/css">
        #counta a { color: Blue; text-decoration: underline; }
            #counta a:visited { color: purple; text-decoration: underline; }
            #counta a:hover { color: red; text-decoration: underline; }
        .active { color: purple !important; text-decoration: underline; }
        .main_left .left_menu { border: 1px solid #92a9bb; height: 1160px; }
    </style>
}
<div>
    <div class="padding5">
        <label>
            开始时间</label>
        <input id="startdt" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <label>
            结束时间</label>
        <input id="enddt" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="btn_refresh"
            iconcls="icon-reload">刷新</a>
    </div>
    <div class="padding5">
        <div id="counta">
            <p>
                <h2 style="color: #2a5caa;" align="center">各地市工单解决率</h2>
            </p>
            <table style="width: 100%; height: 300px;">
                <tr>
                    <td class="dropshadow">
                        <div id="shengju">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="ssunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="siunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="scunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="ssall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="siall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="scall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>

                    <td class="dropshadow">
                        <div id="haisheng">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="hssunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="hsiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="hscunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="hssall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="hsiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="hscall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="fuzhou">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="fzsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="fziunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="fzcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="fzsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="fziall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="fzcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="xiamen">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="xmsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="xmiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="xmcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="xmsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="xmiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="xmcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="ningde">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="ndsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="ndiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="ndcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="ndsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="ndiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="ndcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="dropshadow">
                        <div id="putian">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="ptsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="ptiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="ptcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="ptsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="ptiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="ptcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="quanzhou">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="qzsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="qziunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="qzcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="qzsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="qziall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="qzcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="zhangzhou">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="zzsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="zziunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="zzcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="zzsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="zziall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="zzcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="longyan">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="lysunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="lyiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="lycunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="lysall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="lyiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="lycall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="sanming">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="smsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="smiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="smcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="smsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="smiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="smcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="dropshadow">
                        <div id="nanping">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="npsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="npiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="npcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="npsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="npiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="npcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="hsjck">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="jcksunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="jckiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="jckcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="jcksall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="jckiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="jckcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="haitou">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="htsunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="htiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="htcunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="htsall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="htiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="htcall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="yanye">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="yysunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="yyiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="yycunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="yysall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="yyiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="yycall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="dropshadow">
                        <div id="smjinye">
                        </div>
                        <table>
                            <tr>
                                <td style="width: 45px;">
                                    <a id="smjysunsolve">0</a>
                                </td>
                                <td style="width: 50px;">
                                    <a id="smjyiunsolve">0</a>
                                </td>
                                <td style="width: 40px;">
                                    <a id="smjycunsolve">0</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label id="smjysall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="smjyiall">
                                        0</label>
                                </td>
                                <td>
                                    <label id="smjycall">
                                        0</label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <div class="padding55">
                <table border="0" cellpadding="0" cellspacing="0" id="count" class="border_line"
                    width="500">
                    <tr>
                        <td class="tdName" style="width: 150px">累计自服务量
                        </td>
                        <td class="tdData" style="width: 100px">
                            <label id="servicecount">
                                0</label>
                        </td>
                        <td class="tdName" style="width: 150px">未解决
                        </td>
                        <td class="tdData" style="width: 100px">
                            <a id="serviceunresolvecount">0</a>
                        </td>
                    </tr>
                    <tr>
                        <td class="tdName">累计事件量
                        </td>
                        <td class="tdData">
                            <label id="incidentcount">
                                0</label>
                        </td>
                        <td class="tdName">未解决
                        </td>
                        <td class="tdData">
                            <a id="incidentunsolvecount">0</a>
                        </td>
                    </tr>
                    <tr>
                        <td class="tdName">累计变更量
                        </td>
                        <td class="tdData">
                            <label id="changecount">
                                0</label>
                        </td>
                        <td class="tdName">未解决
                        </td>
                        <td class="tdData">
                            <a id="changeunsolvecount">0</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <a name="show">
            <div style="width: 100%;height:260px;">
                <table id="dg" fit="true" data-options="fitColumns:true,pagination:true,singleSelect:true,pageSize:'10',rownumbers:true">
                    <thead>
                        <tr>
                            <th field="IDS" width="120px" resizable="false" sortable="true">请求ID
                            </th>
                            <th field="TypeS" width="80" resizable="false" sortable="true">请求类型
                            </th>
                            <th field="Description" width="200px" resizable="false" formatter="formateDesc" sortable="true">摘要
                            </th>
                            <th field="Status" width="50px" resizable="false" sortable="true">状态
                            </th>
                            <th field="AssigneeGroup" width="100px" resizable="false" sortable="true">受派组
                            </th>
                            <th field="Assignee" width="80px" resizable="false" sortable="true">受派人
                            </th>
                            <th field="CreateTime" width="130px" resizable="false" sortable="true">创建时间
                            </th>
                            <th field="Submitter" width="80px" resizable="false" sortable="true">创建人
                            </th>

                        </tr>
                    </thead>
                </table>
            </div>
        </a>
    </div>
</div>
